package com.xzy.service;

import com.xzy.mapper.VoteUserMapper;
import com.xzy.pojo.VoteUser;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class VoteUserServiceImpl implements VoteUserService {
    @Autowired
    private VoteUserMapper voteUserMapper;
    @Override
    public VoteUser selectVoteUserByName(String username) {
        return this.voteUserMapper.selectVoteUserByName(username);
    }

    @Override
    public int insertVoteUser(String username, String password) {
        return this.voteUserMapper.insertVoteUser(username, password);
    }

    @Override
    public List<VoteUser> selectVoteUserPage(int begin, int size) {
        return this.voteUserMapper.selectVoteUserPage(begin, size);
    }

    @Override
    public int updateVoteTopicId(Map<String,Object> map){
        return this.voteUserMapper.updateVoteTopicId(map);
    }

    @Override
    public int updateVoteByUsernameYes(String username) {
        return this.voteUserMapper.updateVoteByUsernameYes(username);
    }

    @Override
    public int updateVoteByUsernameNo(String username) {
        return this.voteUserMapper.updateVoteByUsernameNo(username);
    }

}
